//
// Created by lz on 2/27/21.
//

#include "net/Timer.h"

using namespace lzweb;
using namespace lzweb::net;

AtomicInt64 Timer::s_numCreated_;

void Timer::restart(TimeStamp now)
{
	if(repeat_)
	{
		expiration_ = addTime(now,interval_);

	}
	else
	{
		expiration_ = TimeStamp::invalid();
	}
}